Re: way to automatically add untracked files?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johan Herland
Date: Sunday, August 5, 2007 - 5:11 am

On Sunday 05 August 2007, Shawn O. Pearce wrote:

So different users seem to have two different (almost incompatible) 
expectations to git-add:

1. git-add adds new files into the index. git-add has _no_ business removing 
deleted files from the index.

2. git-add updates the index according to the state of the working tree. 
This includes adding new files and removing deleted files.


Both interpretations are useful and worth supporting, but git-add currently 
seems focused on #1 (and rightly so, IMHO).

Even though #2 can be achieved by using a couple of git-add commmands (or a 
longer series of more obscure plumbing-level commands), it might be worth 
considering the more user-friendly alternative of adding a dedicated 
command for supporting #2. Such a command already exists in a similar RCS:

---
$ hg addremove --help
hg addremove [OPTION]... [FILE]...

add all new files, delete all missing files

    Add all new files and remove all missing files from the repository.

    New files are ignored if they match any of the patterns in .hgignore. As
    with add, these changes take effect at the next commit.

[...]
---

Adding a git-addremove command should not be much work, and it would be a 
lot friendlier to people whose workflow is more aligned with #2 than #1.


...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 8:31 pm)
Re: way to automatically add untracked files?, Shawn O. Pearce, (Sat Aug 4, 8:58 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:00 pm)
Re: way to automatically add untracked files?, Shawn O. Pearce, (Sat Aug 4, 9:13 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:13 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:22 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:23 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:30 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:39 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:53 pm)
Re: way to automatically add untracked files?, Linus Torvalds, (Sat Aug 4, 10:03 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 10:04 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 10:14 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 10:17 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sat Aug 4, 10:23 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 10:27 pm)
Re: way to automatically add untracked files?, David Kastrup, (Sun Aug 5, 12:32 am)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 12:34 am)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 4:22 am)
Re: way to automatically add untracked files?, Johan Herland, (Sun Aug 5, 5:11 am)
Re: way to automatically add untracked files?, David Kastrup, (Sun Aug 5, 5:17 am)
Re: way to automatically add untracked files?, Theodore Tso, (Sun Aug 5, 9:11 am)
Re: way to automatically add untracked files?, Linus Torvalds, (Sun Aug 5, 10:04 am)
Re: way to automatically add untracked files?, Johan Herland, (Sun Aug 5, 12:16 pm)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 1:04 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 5:00 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 5:16 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 5:17 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 8:09 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 8:21 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 8:45 pm)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 9:58 pm)
Re: way to automatically add untracked files?, Johan Herland, (Mon Aug 6, 12:46 am)
Re: way to automatically add untracked files?, Junio C Hamano, (Mon Aug 6, 1:45 am)
Re: way to automatically add untracked files?, Johannes Schindelin, (Mon Aug 6, 5:17 am)
Re: way to automatically add untracked files?, David Kastrup, (Mon Aug 6, 11:19 am)
Re: way to automatically add untracked files?, Miles Bader, (Mon Aug 6, 5:08 pm)